package com.glls.customer.feign;

import com.glls.common.R;
import com.glls.common.entity.Goods;
import com.glls.customer.feign.fallback.SearchFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *  feign客户端  要使用 @FeignClient 注解  ， 注解中的value 属性的值 要对应被调用的服务名
 *
 * @author junyang
 * @version 1.0.0
 * @date 2025/2/20 9:36
 */




@FeignClient(value = "service-search",fallback = SearchFeignClientFallBack.class)
public interface SearchFeignClient {


    @RequestMapping("/search/findGoodsById")
    public Goods search(@RequestParam("id") Integer id);




    @PostMapping(value = "/search/searchByEntity")
    public R searchGoodsList(@RequestBody Goods goods);






}
